package com.jcoinexchange.web.config;

import com.jcoinexchange.web.auth.AuthInterceptor;
import com.jcoinexchange.web.auth.LoginAuthorizeAspect;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;

@AutoConfiguration
public class WebAutoConfig {
    private static final  Logger logger = LoggerFactory.getLogger(WebAutoConfig.class);
    @Bean
    public LoginAuthorizeAspect loginAuthorizeAspect() {
        logger.info("start auto configuration loginAuthorizeAspect");
        return new LoginAuthorizeAspect();
    }

    @Bean
    public AuthInterceptor authInterceptor(){
        logger.info("start auto configuration authInterceptor");
        return new AuthInterceptor();
    }
}
